package com.kaily.timemanager.activity;

import android.os.Bundle;

import com.app.common.fragment.BaseFragment;
import com.app.common.obj.UIFrameworkContent;
import com.app.common.view.nav.tabnav.TabNavigationBar;
import com.kaily.timemanager.R;
import com.kaily.timemanager.fragment.DynamicFragment;
import com.kaily.timemanager.fragment.IndexFragment;
import com.kaily.timemanager.fragment.IndexNewFragment;
import com.kaily.timemanager.fragment.MyFragment;
import com.kaily.timemanager.fragment.ThinkFragment;
import com.kaily.timemanager.obj.TitleInfo;
import com.kaily.timemanager.view.TitleLayout;

import java.util.ArrayList;
import java.util.List;

import butterknife.ButterKnife;
import butterknife.InjectView;

import static com.kaily.timemanager.view.TitleLayout.*;

/**
 * Created by zhoulikai on 17/2/16.
 */

public class MainActivity extends AppBaseActivity {


    @InjectView(R.id.content_layout)
    TabNavigationBar contentLayout;
    List<UIFrameworkContent> uiFrameworkContents;

    @Override
    public int initLayoutId() {
        return R.layout.activity_main;
    }

    @Override
    public void initPage() {
        super.initPage();
        uiFrameworkContents = new ArrayList<>();
        uiFrameworkContents.add(new UIFrameworkContent(R.drawable.index_tab_selector, "首页", BaseFragment.newInstance(IndexNewFragment.class.getName(), new Bundle())));
        uiFrameworkContents.add(new UIFrameworkContent(R.drawable.index_tab_selector, "想想", BaseFragment.newInstance(ThinkFragment.class.getName(), new Bundle())));
        uiFrameworkContents.add(new UIFrameworkContent(R.drawable.index_tab_selector, "动态", BaseFragment.newInstance(DynamicFragment.class.getName(), new Bundle())));
        uiFrameworkContents.add(new UIFrameworkContent(R.drawable.index_tab_selector, "我的", BaseFragment.newInstance(MyFragment.class.getName(), new Bundle())));

        contentLayout.setContent(this, uiFrameworkContents);
    }

    @Override
    public TitleInfo getTitleInfo() {
        TitleInfo titleInfo = new TitleInfo();
        titleInfo.title = "首页";

        return titleInfo;
    }
}
